package com.doit.day02

object _02_练习 {
  def main(args: Array[String]): Unit = {
    println(getMax1(10, 20, 30))
  }

  def getMax(a:Int,b:Int,c:Int)={
    var max = a
    if(max < b ) max = b
    if(max < c ) max = c
    max
  }

  def getMax1(a:Int,b:Int,c:Int)={
    if(a>b && a>c){
      a
    }else if(b>a && b>c){
      b
    }else{
      c
    }

  }

}
